package com.situ.boot.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "ore", schema = "brcc", catalog = "")
public class OreEntity {
    private long kid;
    private Long uid;
    private String type;
    private Integer dignum;
    private String flag;
    private String state;
    private Timestamp crtime;
    private String source;
    private Long sourceid;
    private Double biersum;

    @Id
    @Column(name = "kid")
    public long getKid() {
        return kid;
    }

    public void setKid(long kid) {
        this.kid = kid;
    }

    @Basic
    @Column(name = "uid")
    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "dignum")
    public Integer getDignum() {
        return dignum;
    }

    public void setDignum(Integer dignum) {
        this.dignum = dignum;
    }

    @Basic
    @Column(name = "flag")
    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "crtime")
    public Timestamp getCrtime() {
        return crtime;
    }

    public void setCrtime(Timestamp crtime) {
        this.crtime = crtime;
    }

    @Basic
    @Column(name = "source")
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "sourceid")
    public Long getSourceid() {
        return sourceid;
    }

    public void setSourceid(Long sourceid) {
        this.sourceid = sourceid;
    }

    @Basic
    @Column(name = "biersum")
    public Double getBiersum() {
        return biersum;
    }

    public void setBiersum(Double biersum) {
        this.biersum = biersum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OreEntity oreEntity = (OreEntity) o;
        return kid == oreEntity.kid &&
                Objects.equals(uid, oreEntity.uid) &&
                Objects.equals(type, oreEntity.type) &&
                Objects.equals(dignum, oreEntity.dignum) &&
                Objects.equals(flag, oreEntity.flag) &&
                Objects.equals(state, oreEntity.state) &&
                Objects.equals(crtime, oreEntity.crtime) &&
                Objects.equals(source, oreEntity.source) &&
                Objects.equals(sourceid, oreEntity.sourceid) &&
                Objects.equals(biersum, oreEntity.biersum);
    }

    @Override
    public int hashCode() {
        return Objects.hash(kid, uid, type, dignum, flag, state, crtime, source, sourceid, biersum);
    }
}
